package com.ruoyi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 能源消耗量
 * @TableName ny1
 */
@TableName(value ="ny1")
@Data
public class Ny1 implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 能源类型
     */
    private String ny;

    /**
     * 能源消耗量
     */
    private String nyxhl1;

    /**
     * 时间范围（日/周/月/年）
     */
    private String sjfw1;

    /**
     * 地域范围
     */
    private String dyfw1;

    /**
     * 能源消耗结构（%）
     */
    private Long nyxhjg1;

    /**
     * 能源消耗趋势
     */
    private Long nyxhqs1;

    /**
     * 能源消耗排名
     */
    private Long nyxhpm1;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Ny1 other = (Ny1) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getNy() == null ? other.getNy() == null : this.getNy().equals(other.getNy()))
            && (this.getNyxhl1() == null ? other.getNyxhl1() == null : this.getNyxhl1().equals(other.getNyxhl1()))
            && (this.getSjfw1() == null ? other.getSjfw1() == null : this.getSjfw1().equals(other.getSjfw1()))
            && (this.getDyfw1() == null ? other.getDyfw1() == null : this.getDyfw1().equals(other.getDyfw1()))
            && (this.getNyxhjg1() == null ? other.getNyxhjg1() == null : this.getNyxhjg1().equals(other.getNyxhjg1()))
            && (this.getNyxhqs1() == null ? other.getNyxhqs1() == null : this.getNyxhqs1().equals(other.getNyxhqs1()))
            && (this.getNyxhpm1() == null ? other.getNyxhpm1() == null : this.getNyxhpm1().equals(other.getNyxhpm1()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getNy() == null) ? 0 : getNy().hashCode());
        result = prime * result + ((getNyxhl1() == null) ? 0 : getNyxhl1().hashCode());
        result = prime * result + ((getSjfw1() == null) ? 0 : getSjfw1().hashCode());
        result = prime * result + ((getDyfw1() == null) ? 0 : getDyfw1().hashCode());
        result = prime * result + ((getNyxhjg1() == null) ? 0 : getNyxhjg1().hashCode());
        result = prime * result + ((getNyxhqs1() == null) ? 0 : getNyxhqs1().hashCode());
        result = prime * result + ((getNyxhpm1() == null) ? 0 : getNyxhpm1().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", ny=").append(ny);
        sb.append(", nyxhl1=").append(nyxhl1);
        sb.append(", sjfw1=").append(sjfw1);
        sb.append(", dyfw1=").append(dyfw1);
        sb.append(", nyxhjg1=").append(nyxhjg1);
        sb.append(", nyxhqs1=").append(nyxhqs1);
        sb.append(", nyxhpm1=").append(nyxhpm1);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}